<?php

declare(strict_types=1);

namespace App\Model;

use Hyperf\Database\Model\SoftDeletes;
use Hyperf\DbConnection\Model\Model;

class DataBackhaulSetting extends Model
{
    use SoftDeletes;

    protected ?string $table = 'data_backhaul_setting';


    public function platform()
    {
        return $this->hasOne(DataSpreadPlatform::class, 'id', 'spread_platform_id')->select('id','name');
    }

    public function applet()
    {
        return $this->hasOne(Applet::class, 'id', 'applet_id')->withTrashed()->select('id','name');
    }
    public function company()
    {
        return $this->hasOne(Company::class, 'id', 'company_id')->withTrashed()->select('id','name');
    }
}
